Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.


QTRS
  ↳ RRRPoloQTRSProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

The following Q TRS is given: Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(nil)) → mark(0)
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
The following rules can be removed by the rule removal processor [15] because they are oriented strictly by a polynomial ordering:

active(length(nil)) → mark(0)
Used ordering:
Polynomial interpretation [25]:

POL(0) = 0   
POL(U11(x1, x2)) = x1 + x2   
POL(U12(x1, x2)) = x1 + x2   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 2·x1 + x2   
POL(length(x1)) = x1   
POL(mark(x1)) = x1   
POL(nil) = 1   
POL(ok(x1)) = x1   
POL(proper(x1)) = x1   
POL(s(x1)) = x1   
POL(top(x1)) = x1   
POL(tt) = 0   
POL(zeros) = 0   




↳ QTRS
  ↳ RRRPoloQTRSProof
QTRS
      ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.

Using Dependency Pairs [1,15] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(U11(tt, L)) → U121(tt, L)
LENGTH(ok(X)) → LENGTH(X)
TOP(mark(X)) → PROPER(X)
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
TOP(ok(X)) → ACTIVE(X)
ACTIVE(U12(tt, L)) → S(length(L))
ACTIVE(length(X)) → ACTIVE(X)
PROPER(U11(X1, X2)) → U111(proper(X1), proper(X2))
PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
ACTIVE(zeros) → CONS(0, zeros)
PROPER(length(X)) → LENGTH(proper(X))
ACTIVE(U11(X1, X2)) → U111(active(X1), X2)
PROPER(cons(X1, X2)) → PROPER(X2)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
LENGTH(mark(X)) → LENGTH(X)
PROPER(U12(X1, X2)) → PROPER(X1)
TOP(ok(X)) → TOP(active(X))
S(mark(X)) → S(X)
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
ACTIVE(length(X)) → LENGTH(active(X))
PROPER(U11(X1, X2)) → PROPER(X2)
PROPER(length(X)) → PROPER(X)
PROPER(U12(X1, X2)) → PROPER(X2)
PROPER(s(X)) → S(proper(X))
PROPER(U12(X1, X2)) → U121(proper(X1), proper(X2))
U111(ok(X1), ok(X2)) → U111(X1, X2)
ACTIVE(U11(X1, X2)) → ACTIVE(X1)
ACTIVE(length(cons(N, L))) → U111(tt, L)
ACTIVE(s(X)) → ACTIVE(X)
U121(mark(X1), X2) → U121(X1, X2)
TOP(mark(X)) → TOP(proper(X))
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(U12(X1, X2)) → U121(active(X1), X2)
U111(mark(X1), X2) → U111(X1, X2)
U121(ok(X1), ok(X2)) → U121(X1, X2)
ACTIVE(U12(tt, L)) → LENGTH(L)
PROPER(U11(X1, X2)) → PROPER(X1)
ACTIVE(s(X)) → S(active(X))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
QDP
          ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
CONS(mark(X1), X2) → CONS(X1, X2)
ACTIVE(U11(tt, L)) → U121(tt, L)
LENGTH(ok(X)) → LENGTH(X)
TOP(mark(X)) → PROPER(X)
ACTIVE(cons(X1, X2)) → CONS(active(X1), X2)
TOP(ok(X)) → ACTIVE(X)
ACTIVE(U12(tt, L)) → S(length(L))
ACTIVE(length(X)) → ACTIVE(X)
PROPER(U11(X1, X2)) → U111(proper(X1), proper(X2))
PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
ACTIVE(zeros) → CONS(0, zeros)
PROPER(length(X)) → LENGTH(proper(X))
ACTIVE(U11(X1, X2)) → U111(active(X1), X2)
PROPER(cons(X1, X2)) → PROPER(X2)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
LENGTH(mark(X)) → LENGTH(X)
PROPER(U12(X1, X2)) → PROPER(X1)
TOP(ok(X)) → TOP(active(X))
S(mark(X)) → S(X)
PROPER(cons(X1, X2)) → CONS(proper(X1), proper(X2))
CONS(ok(X1), ok(X2)) → CONS(X1, X2)
ACTIVE(length(X)) → LENGTH(active(X))
PROPER(U11(X1, X2)) → PROPER(X2)
PROPER(length(X)) → PROPER(X)
PROPER(U12(X1, X2)) → PROPER(X2)
PROPER(s(X)) → S(proper(X))
PROPER(U12(X1, X2)) → U121(proper(X1), proper(X2))
U111(ok(X1), ok(X2)) → U111(X1, X2)
ACTIVE(U11(X1, X2)) → ACTIVE(X1)
ACTIVE(length(cons(N, L))) → U111(tt, L)
ACTIVE(s(X)) → ACTIVE(X)
U121(mark(X1), X2) → U121(X1, X2)
TOP(mark(X)) → TOP(proper(X))
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(U12(X1, X2)) → U121(active(X1), X2)
U111(mark(X1), X2) → U111(X1, X2)
U121(ok(X1), ok(X2)) → U121(X1, X2)
ACTIVE(U12(tt, L)) → LENGTH(L)
PROPER(U11(X1, X2)) → PROPER(X1)
ACTIVE(s(X)) → S(active(X))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 8 SCCs with 17 less nodes.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LENGTH(ok(X)) → LENGTH(X)
LENGTH(mark(X)) → LENGTH(X)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

LENGTH(ok(X)) → LENGTH(X)
LENGTH(mark(X)) → LENGTH(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
S(mark(X)) → S(X)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

S(ok(X)) → S(X)
S(mark(X)) → S(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U121(mark(X1), X2) → U121(X1, X2)
U121(ok(X1), ok(X2)) → U121(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U121(mark(X1), X2) → U121(X1, X2)
U121(ok(X1), ok(X2)) → U121(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U111(mark(X1), X2) → U111(X1, X2)
U111(ok(X1), ok(X2)) → U111(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

U111(ok(X1), ok(X2)) → U111(X1, X2)
U111(mark(X1), X2) → U111(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

CONS(mark(X1), X2) → CONS(X1, X2)
CONS(ok(X1), ok(X2)) → CONS(X1, X2)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(s(X)) → PROPER(X)
PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(U11(X1, X2)) → PROPER(X2)
PROPER(length(X)) → PROPER(X)
PROPER(U12(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(U12(X1, X2)) → PROPER(X1)
PROPER(U11(X1, X2)) → PROPER(X1)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QDPSizeChangeProof
              ↳ QDP
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

PROPER(cons(X1, X2)) → PROPER(X1)
PROPER(s(X)) → PROPER(X)
PROPER(U11(X1, X2)) → PROPER(X2)
PROPER(cons(X1, X2)) → PROPER(X2)
PROPER(U12(X1, X2)) → PROPER(X2)
PROPER(length(X)) → PROPER(X)
PROPER(U12(X1, X2)) → PROPER(X1)
PROPER(U11(X1, X2)) → PROPER(X1)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(length(X)) → ACTIVE(X)
ACTIVE(U11(X1, X2)) → ACTIVE(X1)

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ QDPSizeChangeProof
              ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

ACTIVE(s(X)) → ACTIVE(X)
ACTIVE(cons(X1, X2)) → ACTIVE(X1)
ACTIVE(U12(X1, X2)) → ACTIVE(X1)
ACTIVE(U11(X1, X2)) → ACTIVE(X1)
ACTIVE(length(X)) → ACTIVE(X)

R is empty.
Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By using the subterm criterion [20] together with the size-change analysis [32] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
QDP
                ↳ UsableRulesProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(mark(X)) → mark(s(X))
length(mark(X)) → mark(length(X))
proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
s(ok(X)) → ok(s(X))
length(ok(X)) → ok(length(X))
top(mark(X)) → top(proper(X))
top(ok(X)) → top(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We can use the usable rules and reduction pair processor [15] with the Ce-compatible extension of the polynomial order that maps every function symbol to the sum of its argument. Then, we can delete all non-usable rules [17] from R.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
QDP
                    ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(X)) → TOP(proper(X))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule TOP(mark(X)) → TOP(proper(X)) at position [0] we obtained the following new rules:

TOP(mark(tt)) → TOP(ok(tt))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(mark(zeros)) → TOP(ok(zeros))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(nil)) → TOP(ok(nil))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(0)) → TOP(ok(0))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ Narrowing
QDP
                        ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(mark(tt)) → TOP(ok(tt))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(mark(zeros)) → TOP(ok(zeros))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(nil)) → TOP(ok(nil))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
TOP(mark(0)) → TOP(ok(0))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [15,17,22] contains 1 SCC with 4 less nodes.

↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
QDP
                            ↳ Narrowing

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
TOP(ok(X)) → TOP(active(X))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
By narrowing [15] the rule TOP(ok(X)) → TOP(active(X)) at position [0] we obtained the following new rules:

TOP(ok(U11(tt, x0))) → TOP(mark(U12(tt, x0)))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(ok(zeros)) → TOP(mark(cons(0, zeros)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(length(cons(x0, x1)))) → TOP(mark(U11(tt, x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ Narrowing
QDP
                                ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(length(cons(x0, x1)))) → TOP(mark(U11(tt, x1)))
TOP(ok(U11(tt, x0))) → TOP(mark(U12(tt, x0)))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(zeros)) → TOP(mark(cons(0, zeros)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(U11(tt, x0))) → TOP(mark(U12(tt, x0)))
The remaining pairs can at least be oriented weakly.

TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(length(cons(x0, x1)))) → TOP(mark(U11(tt, x1)))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(zeros)) → TOP(mark(cons(0, zeros)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2)) = x1   
POL(U12(x1, x2)) = 0   
POL(active(x1)) = x1   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(proper(x1)) = x1   
POL(s(x1)) = 0   
POL(tt) = 1   
POL(zeros) = 0   

The following usable rules [17] were oriented:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
active(length(cons(N, L))) → mark(U11(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(U11(tt, L)) → mark(U12(tt, L))
active(zeros) → mark(cons(0, zeros))
length(ok(X)) → ok(length(X))
length(mark(X)) → mark(length(X))
proper(nil) → ok(nil)
proper(length(X)) → length(proper(X))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(ok(X)) → ok(s(X))
s(mark(X)) → mark(s(X))
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(length(X)) → length(active(X))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ QDPOrderProof
QDP
                                    ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(length(cons(x0, x1)))) → TOP(mark(U11(tt, x1)))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(zeros)) → TOP(mark(cons(0, zeros)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(length(cons(x0, x1)))) → TOP(mark(U11(tt, x1)))
TOP(ok(zeros)) → TOP(mark(cons(0, zeros)))
The remaining pairs can at least be oriented weakly.

TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2)) = 0   
POL(U12(x1, x2)) = 0   
POL(active(x1)) = 0   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 1   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(proper(x1)) = 0   
POL(s(x1)) = 0   
POL(tt) = 0   
POL(zeros) = 1   

The following usable rules [17] were oriented:

cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
length(ok(X)) → ok(length(X))
length(mark(X)) → mark(length(X))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(ok(X)) → ok(s(X))
s(mark(X)) → mark(s(X))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
QDP
                                        ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [15].


The following pairs can be oriented strictly and are deleted.


TOP(ok(U12(tt, x0))) → TOP(mark(s(length(x0))))
The remaining pairs can at least be oriented weakly.

TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))
Used ordering: Polynomial interpretation with max and min functions [25]:

POL(0) = 0   
POL(TOP(x1)) = x1   
POL(U11(x1, x2)) = 0   
POL(U12(x1, x2)) = 1   
POL(active(x1)) = 0   
POL(cons(x1, x2)) = 0   
POL(length(x1)) = 0   
POL(mark(x1)) = x1   
POL(nil) = 0   
POL(ok(x1)) = x1   
POL(proper(x1)) = 0   
POL(s(x1)) = 0   
POL(tt) = 0   
POL(zeros) = 0   

The following usable rules [17] were oriented:

cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
length(ok(X)) → ok(length(X))
length(mark(X)) → mark(length(X))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U12(mark(X1), X2) → mark(U12(X1, X2))
s(ok(X)) → ok(s(X))
s(mark(X)) → mark(s(X))



↳ QTRS
  ↳ RRRPoloQTRSProof
    ↳ QTRS
      ↳ DependencyPairsProof
        ↳ QDP
          ↳ DependencyGraphProof
            ↳ AND
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
              ↳ QDP
                ↳ UsableRulesProof
                  ↳ QDP
                    ↳ Narrowing
                      ↳ QDP
                        ↳ DependencyGraphProof
                          ↳ QDP
                            ↳ Narrowing
                              ↳ QDP
                                ↳ QDPOrderProof
                                  ↳ QDP
                                    ↳ QDPOrderProof
                                      ↳ QDP
                                        ↳ QDPOrderProof
QDP

Q DP problem:
The TRS P consists of the following rules:

TOP(mark(U12(x0, x1))) → TOP(U12(proper(x0), proper(x1)))
TOP(ok(U11(x0, x1))) → TOP(U11(active(x0), x1))
TOP(mark(length(x0))) → TOP(length(proper(x0)))
TOP(ok(s(x0))) → TOP(s(active(x0)))
TOP(ok(length(x0))) → TOP(length(active(x0)))
TOP(mark(s(x0))) → TOP(s(proper(x0)))
TOP(ok(cons(x0, x1))) → TOP(cons(active(x0), x1))
TOP(ok(U12(x0, x1))) → TOP(U12(active(x0), x1))
TOP(mark(cons(x0, x1))) → TOP(cons(proper(x0), proper(x1)))
TOP(mark(U11(x0, x1))) → TOP(U11(proper(x0), proper(x1)))

The TRS R consists of the following rules:

proper(zeros) → ok(zeros)
proper(cons(X1, X2)) → cons(proper(X1), proper(X2))
proper(0) → ok(0)
proper(U11(X1, X2)) → U11(proper(X1), proper(X2))
proper(tt) → ok(tt)
proper(U12(X1, X2)) → U12(proper(X1), proper(X2))
proper(s(X)) → s(proper(X))
proper(length(X)) → length(proper(X))
proper(nil) → ok(nil)
length(mark(X)) → mark(length(X))
length(ok(X)) → ok(length(X))
s(mark(X)) → mark(s(X))
s(ok(X)) → ok(s(X))
U12(mark(X1), X2) → mark(U12(X1, X2))
U12(ok(X1), ok(X2)) → ok(U12(X1, X2))
U11(mark(X1), X2) → mark(U11(X1, X2))
U11(ok(X1), ok(X2)) → ok(U11(X1, X2))
cons(mark(X1), X2) → mark(cons(X1, X2))
cons(ok(X1), ok(X2)) → ok(cons(X1, X2))
active(zeros) → mark(cons(0, zeros))
active(U11(tt, L)) → mark(U12(tt, L))
active(U12(tt, L)) → mark(s(length(L)))
active(length(cons(N, L))) → mark(U11(tt, L))
active(cons(X1, X2)) → cons(active(X1), X2)
active(U11(X1, X2)) → U11(active(X1), X2)
active(U12(X1, X2)) → U12(active(X1), X2)
active(s(X)) → s(active(X))
active(length(X)) → length(active(X))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.